package com.matrix.java.chap_05;

/*
    英里与千米之间的互换
 */
public class Ex5_06 {
    public static void main(String[] args) {
        final double Proportion = 1.609;
        System.out.println("英里" + "-------" + "千米" + "-------" + "千米" + "-------" + "英里");
        for (int i = 1; i < 11; i++) {
            double mile2Kilometer, kilometer2Mile;
            mile2Kilometer = i * Proportion;
            System.out.printf("%d%s%.3f", i, "--------", mile2Kilometer);
            int m = 15;
            m += 5 * i;
            kilometer2Mile = m / Proportion;
            System.out.printf("%s%d%s%.3f%n", "--------", m, "--------", kilometer2Mile);
        }
    }
}
